package main

import (
	"fmt"
	"time"
)

func main() {

	// 获得当前时区的时间
	t := time.Now()
	fmt.Println(t)

	// 获取特定时区的时间
	loc, _ := time.LoadLocation("America/New_York")
	t1 := t.In(loc)
	fmt.Println(t1)

}

/*
2022-05-18 15:50:09.690937 +0800 CST m=+0.000177709
2022-05-18 03:50:09.690937 -0400 EDT
*/
